<h1>Listing bugs</h1>

<table>
  <tr>
    <th>Project</th>
    <th>Summary</th>
    <th>Description</th>
    <th>Priority</th>
    <th>Status</th>
    <th colspan="3" ></th>
  </tr>
  
<% for bug in @bugs %>
  <tr>
    <td><%=h bug.project.name %></td>
    <td><%=h bug.summary %></td>
    <td><%=h bug.description %></td>
    <td><%=h bug.priority %></td>
    <td><%=h bug.status.name %></td>
    <td><%= link_to 'Show', :action => 'show', :id => bug %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => bug %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => bug }, :confirm => 'Are you sure?', :post => true %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @bug_pages.current.previous } if @bug_pages.current.previous %>
<%= link_to 'Next page', { :page => @bug_pages.current.next } if @bug_pages.current.next %> 

<br />

<%= link_to 'New bug', :action => 'new' %>
